/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.employee.entity;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.Office;
import javax.validation.constraints.NotNull;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 加班列表Entity
 * @author jyangye
 * @version 2018-01-14
 */
public class ViEmpOvertimeList extends DataEntity<ViEmpOvertimeList> {
	
	private static final long serialVersionUID = 1L;
	private String employeeId;		// 员工编号
	private Office comp;		// 组织机构
	private Office dept;		// 部门
	private Office post;		// 职位
	private String name;		// 姓名
	private String code;		// 身份证号
	private String overtimeId;		// 本月加班编号
	private String type;		// 加班类型
	private Date startTime;		// 加班起始时间
	private Date endTime;		// 加班结束时间
	private Double overtimeHours;		// 加班时长
	private Double overtimeDays;		// 实际加班天数
	private String reason;		// 加班具体原因

    private String errMsg; // 错误信息
	
	public ViEmpOvertimeList() {
		super();
	}

	public ViEmpOvertimeList(String id){
		super(id);
	}


	public String getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}
	

	public Office getComp() {
		return comp;
	}

	public void setComp(Office comp) {
		this.comp = comp;
	}
	
	@ExcelField(title="部门", align=2, type = 1, sort=40)
	public Office getDept() {
		return dept;
	}

	public void setDept(Office dept) {
		this.dept = dept;
	}
	
	@ExcelField(title="职位", align=2, type = 1, sort=50)
	public Office getPost() {
		return post;
	}

	public void setPost(Office post) {
		this.post = post;
	}
	
	@Length(min=1, max=32, message="姓名长度必须介于 1 和 32 之间")
	@ExcelField(title="姓名", align=2, sort=60)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=1, max=32, message="身份证号长度必须介于 1 和 32 之间")
	@ExcelField(title="*身份证号", align=2, sort=70, isText = true)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getOvertimeId() {
		return overtimeId;
	}

	public void setOvertimeId(String overtimeId) {
		this.overtimeId = overtimeId;
	}
	
	@Length(min=0, max=32, message="加班类型长度必须介于 0 和 32 之间")
	@ExcelField(title="*加班类型", align=2, sort=90)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	@ExcelField(title="*加班起始时间", align=2, sort=100)
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	@ExcelField(title="*加班结束时间", align=2, sort=110)
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@ExcelField(title="*加班时长", align=2, sort=120)
	public Double getOvertimeHours() {
		return overtimeHours;
	}

	public void setOvertimeHours(Double overtimeHours) {
		this.overtimeHours = overtimeHours;
	}
	
	@ExcelField(title="实际加班天数", align=2, sort=130)
	public Double getOvertimeDays() {
		return overtimeDays;
	}

	public void setOvertimeDays(Double overtimeDays) {
		this.overtimeDays = overtimeDays;
	}
	
	@Length(min=0, max=64, message="加班具体原因长度必须介于 0 和 64 之间")
	@ExcelField(title="加班具体原因", align=2, sort=140)
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}


	@ExcelField(title = "错误信息", align = 2, type = 1, sort = 180)
    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}